#include <iostream>
#include <thread>
#include <atomic>
using namespace std;

atomic<int> gCount(0);

void threadFunc(void)
{
    for (size_t i = 0; i < 20000000; i++)
    {
        gCount++;
    }
}

int main()
{
    thread th1(threadFunc);
    thread th2(threadFunc);
    th1.join();
    th2.join();
    cout << "gCount = " << gCount << endl;
    cout << "gCount.is_lock_free() = " << gCount.is_lock_free() << endl;

    return 0;
}